Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

preflight cors fix #12

Merged
merged 1 commit into from
Oct 31, 2024
Merged

preflight cors fix #12

merged 1 commit into from
Oct 31, 2024

Conversation

cedricve
Copy link
Member

@cedricve cedricve commented Oct 31, 2024

Preflight CORS Fix

Motivation

The current configuration does not handle CORS preflight requests correctly, leading to potential issues when making cross-origin requests to the API. This can result in failed API calls and a poor user experience.

Summary of Changes

  1. Chart Version Update:

    • Updated the chart version from 0.68.0 to 0.69.0 in charts/hub/Chart.yaml to reflect the changes.
  2. Ingress Configuration:

    • Added a server snippet to handle CORS preflight (OPTIONS) requests by returning a 200 status code in charts/hub/templates/kerberos-hub/hub-api.yaml.
    • Ensured that this configuration is only applied when kerberoshub.oauth2Proxy is enabled.

Benefits

  • Improved Cross-Origin Resource Sharing (CORS) Handling: By correctly handling preflight OPTIONS requests, this change ensures that cross-origin API calls can be made successfully.
  • Enhanced User Experience: Users will experience fewer issues with API calls, leading to a smoother and more reliable interaction with the application.

This fix is crucial for enabling seamless cross-origin requests and improving the overall reliability and usability of the API.

@cedricve cedricve merged commit d816910 into main Oct 31, 2024
2 checks passed
@cedricve cedricve deleted the feature/add-oauth-to-api branch October 31, 2024 11:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant